package com.idol.framework.builder;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author Supreme_Sir
 * @version 1.0
 * @className ConfigBuilder
 * @description 配置文件加载类
 * @date 2020/10/31 14:12
 **/
public class ConfigBuilder {
    private String string;

    /**
     * 加载框架配置文件
     * @param contextConfigLocation
     * @return Properties
     * @throws IOException
     */
    public static Properties doLoadConfig(String contextConfigLocation) throws IOException {
        InputStream inputStream = ConfigBuilder.class.getClassLoader().getResourceAsStream(contextConfigLocation);
        Properties configProperties = new Properties();
        configProperties.load(inputStream);
        return configProperties;
    }
}
